<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加员工</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>
<style>
    ::-webkit-scrollbar {
        width: 8px;
        transform: translateX(8px);
        position: absolute;
        right: 0;
    }

    ::-webkit-scrollbar-thumb {
        background-color: rgb(139, 139, 139);
    }
</style>

<body>
    <div id="app" class="minWidth">
        <div class="table_titel" style="display: flex;justify-content: space-between;">
            <div class="titel">员工信息</div>
            <div style="display: flex;align-items: center;">
                <el-button @click="AddEmployee" size="small" type="primary">增加</el-button>
                <el-button @click="RdcEmployee" size="small" type="danger">删除</el-button>
                <el-upload id="Excel" class="upload-demo" style="margin-left: 10px;display: flex;" action="" :before-remove="XlsxbeforeRemove"
                    :file-list="fileXlsx" :before-upload="uploadXLSX">
                    <el-button size="small" type="success">导入</el-button>
                </el-upload>
            </div>
        </div>
        <el-form ref="form" :inline="true" :model="IO_form">
            <el-descriptions style="margin-bottom: 30px;" v-for="(item,i) in IO_form.Employees" :key="i" :column="2"
                border size="small">
                <el-descriptions-item label="移动电话">
                    <el-form-item :rules="{
                        required: true, message: '请输入手机号', trigger: 'blur'
                      }" :prop="'Employees.' + i + '.Employee_Phone'">
                        <el-input placeholder="请输入员工移动电话" v-model="item.Employee_Phone" clearable>
                        </el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="组织结构">
                    <el-form-item :rules="{
                        required: true, message: '请选择组织结构', trigger: 'change'
                      }" :prop="'Employees.' + i + '.organization'">
                        <el-cascader v-model="item.organization" style="width: 80%;" :options="Employees" :props="{
                            expandTrigger: 'hover',
                            label: 'text',
                            value: 'value',
                            children: 'children',
                          }" placeholder="请选择组织结构" clearable></el-cascader>
                    </el-form-item>
                    </el-form-item>
                </el-descriptions-item>
        </el-form>
        <div
            style="display: flex;justify-content: center;position: fixed;width: 100%;z-index: 100;background-color: #fff;bottom: 0;">
            <el-button :loading="loading" @click="submitForm('form')" type="primary">提交</el-button>
            <el-button @click="back" type="primary">返回</el-button>
        </div>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/tablesMergeCell.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="../../../js/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../js/FileSaver.js"></script>
    <script type="text/javascript" src="../../../js/xlsx.full.min.js"></script>
    <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>